#ifndef COMMAND_H
#define COMMAND_H

#include "Node.h"
#include "ArgNode.h"
#include <list>
#include <string>

class Command : public Node
{
	public:
		Command(char * Name, ArgNode * A)
			: name(Name)
		{
			std::list<Node*> l = A->getArgList();
			for( std::list<Node*>::iterator it = l.begin(); it != l.end(); it++ )
				exprs.push_back(*it);
			//delete(A);
		}
		~Command();
		void addExpr(Node * expr);
		const std::list<Node*> & getExprList() const;
		const std::string & getName() const;
		void accept(Visitor & v);
		void SetName(char * Name) {name = std::string(Name);}

	private:
		std::list<Node*> exprs;
		std::string name;
};

#endif

